package org.jeecg.modules.activiti.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.activiti.entity.ActBusiness;
import org.jeecg.modules.activiti.vo.HistoricTaskVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @Description: 流程业务扩展表
 * @Author: pmc
 * @Date: 2020-03-30
 * @Version: V1.0
 */
public interface IActBusinessService extends IService<ActBusiness> {

    List<ActBusiness> findByProcDefId(String id);

    boolean saveApplyForm(String tableId, HttpServletRequest request);

    Map<String, Object> getApplyForm(String tableId, String tableName);

    void deleteBusiness(String tableName, String tableId);

    List<String> findUserIdByTypeAndTaskId(String type, String taskId);

    void insertHI_IDENTITYLINK(String id, String type, String userId, String taskId, String procInstId);

    List<String> selectIRunIdentity(String taskId, String type);

    void updateBusinessStatus(String tableName, String tableId, Integer processStatus, String processStatusText);

    Map<String, Object> getBusiData(String tableId, String tableName);

    List<String> listByTypeApp(String type);

    Map getTipData(HttpServletRequest req);

    List<HistoricTaskVo> getHistoricTaskVos(HttpServletRequest req, String name, String categoryId, Integer priority);

    String saveOrUpdateAndUpdateApplyForm(String id, Map<String, Object> map);

    Integer getBusiNum(String tableId, String tableName);

    //    Map<String, Object> getActHiVarinst(String executionId);
    ActBusiness getByProcInstId(String procInstId);

    List<String> deploymentIdListByType(String type);


    List<Map> findHis( @Param("taskId") String taskId);
    List<Map> findHisPass( @Param("taskId") String taskId);
}
